/**
 * @Creator: niumijia
 * @Date: 2020/04/29
 *
 * 一些Select中写死的Option
 */

// 业务线
export const BizLineList = [
    {
        value: '高途课堂',
        name: '高途课堂'
    },
    {
        value: '高途在线',
        name: '高途在线'
    },
    {
        value: '会议',
        name: '会议'
    },
    {
        value: '微师',
        name: '微师'
    },
];

// 直播间类型
export const LiveRoomTypeList = [
    {
        value: '全部',
        name: '全部'
    },
    {
        value: '大班',
        name: '大班'
    },
    {
        value: '小班',
        name: '小班'
    },
    {
        value: '1vN',
        name: '1vN'
    },
    {
        value: '答疑课',
        name: '答疑课'
    },
    {
        value: '家长会',
        name: '家长会'
    },
    {
        value: '自习室',
        name: '自习室'
    },
];

// 排序label对应值
export const SortLabelToValue = {
    ascend: 1,
    descend: 2
};

// 直播引擎
export const LiveEngine = [
    {
        value: '全部',
        name: '全部'
    },
    {
        value: 'xstream',
        name: 'xstream'
    },
    {
        value: 'avsdk',
        name: 'avsdk'
    },
    {
        value: '未知',
        name: '未知'
    },
];

// 客户端
export const ClientList = [
    {
        value: '全部',
        name: '全部'
    },
    {
        value: 'pc网页',
        name: 'pc网页'
    },
    {
        value: 'pc客户端',
        name: 'pc客户端'
    },
    {
        value: 'm站',
        name: 'm站'
    },
    {
        value: 'iOS',
        name: 'iOS'
    },
    {
        value: 'android',
        name: 'android'
    },
    {
        value: 'mac客户端',
        name: 'mac客户端'
    }
];

// 播放类型
export const PlayTypeList = [
    {
        value: '全部',
        name: '全部',
    },
    {
        value: '直播',
        name: '直播',
    },
    {
        value: '点播',
        name: '点播',
    },
    {
        value: '回放',
        name: '回放',
    },
];

export const StreamSystemList = [
    {
        value: '全部',
        name: '全部',
    },
    {
        value: 'xstream',
        name: 'xstream',
    },
    {
        value: 'avsdk',
        name: 'avsdk',
    },
    {
        value: '未知',
        name: '未知',
    },
];

export const dimensionMap = new Map([
    // [ID, Name]
    ['LiveRoomDetail_select_room_number', 'room_number'],
    ['LiveRoomDetail_select_client_type', 'client_type'],
    ['LiveRoomDetail_select_event_time_sub', 'event_time_sub'],
    // 总览看板
    ['GeneralTrend_select_dt', 'dt'],
    ['GeneralTrend_select_contrast_dt', 'contrast_dt'],
    ['GeneralTrend_select_biz_type', 'biz_type'],
    ['GeneralTrend_select_room_type', 'room_type'],
    ['GeneralTrend_select_engine_type', 'engine_type'],
    ['GeneralTrend_select_client_type', 'client_type'],
    // 流媒体看板
    ['StreamingMediaMonitoring_select_dt', 'dt'],
    ['StreamingMediaMonitoring_select_biz_type', 'biz_type'],
    ['StreamingMediaMonitoring_select_client_type', 'client_type'],
    ['StreamingMediaMonitoring_select_engine_type', 'engine_type'],
    [
        'StreamingMediaMonitoring_PartTwo_select_xmpp',
        {
            dimensionName: 'xmpp',
            unitId: 'StreamingMediaMonitoring_PartTwo_select'
        }
    ],
    [
        'StreamingMediaMonitoring_PartThree_select_sfu',
        {
            dimensionName: 'sfu',
            unitId: 'StreamingMediaMonitoring_PartThree_select',
        }
    ],
    // webapi看板
    ['WebApi_Monitor_PartOne_select_dt', 'dt'],
    ['WebApi_Monitor_PartOne_select_biz_type', 'biz_type'],
    ['WebApi_Monitor_PartOne_select_client_type', 'client_type'],
    [
        'WebApi_Monitor_PartOne_select_interface_name',
        {
            dimensionName: 'interface_name',
            unitId: 'WebApi_Monitor_PartOne_select'
        }
    ],
    ['WebApi_Monitor_PartOne_select_type', 'type'],
    // roomServer看板
    ['RoomServer_Monitor_PartOne_select_dt', 'dt'],
    ['RoomServer_Monitor_PartOne_select_biz_type', 'biz_type'],
    ['RoomServer_Monitor_PartOne_select_client_type', 'client_type'],
    [
        'RoomServer_Monitor_PartOne_select_rs_address', {
            dimensionName: 'rs_address',
            unitId: 'RoomServer_Monitor_PartOne_select'
        }
    ],
    // 直播间列表
    ['LiveRoomMonitoringList_select_live_begin_time', 'live_begin_time'],
    ['LiveRoomMonitoringList_select_biz_typ', 'biz_type'],
    ['LiveRoomMonitoringList_select_room_type', 'room_type'],
    ['LiveRoomMonitoringList_select_engine_type', 'engine_type']


]);

export const chartMap = new Map([
    [
        '老师CPU和内存', {
            unitId: 'liveMonitoring_part_two_2_1_composite',
            dashBoardId: 'liveMonitoring_part_two_2_1',
        }
    ],
    [
        '老师丢包率', {
            unitId: 'liveMonitoring_part_two_2_2_composite',
            dashBoardId: 'liveMonitoring_part_two_2_2',
        }
    ],
    [
        '老师帧率和码率', {
            unitId: 'liveMonitoring_part_two_2_3_composite',
            dashBoardId: 'liveMonitoring_part_two_2_3',
        }
    ],
    [
        '老师RTT', {
            unitId: 'liveMonitoring_part_two_2_4_line',
            dashBoardId: 'liveMonitoring_part_two_2_4',
        }
    ],
    [
        '学生人数', {
            unitId: 'liveMonitoring_part_two_2_5_composite',
            dashBoardId: 'liveMonitoring_part_two_2_5',
        }
    ],
    [
        '学生卡顿', {
            unitId: 'liveMonitoring_part_two_2_6_composite',
            dashBoardId: 'liveMonitoring_part_two_2_6',
        }
    ],
    [
        '流媒体连接', {
            unitId: 'liveMonitoring_part_two_2_7_composite',
            dashBoardId: 'liveMonitoring_part_two_2_7',
        }
    ],
    [
        '聊天问题人数', {
            unitId: 'liveMonitoring_part_two_2_8_composite',
            dashBoardId: 'liveMonitoring_part_two_2_8',
        }
    ],
    [
        '聊天问题人头率', {
            unitId: 'liveMonitoring_part_two_2_9_composite',
            dashBoardId: 'liveMonitoring_part_two_2_9',
        }
    ],
    // 总览看板
    [
        '总览学生人数', {
            unitId: 'GeneralTrend_PartOne_composite',
            dashBoardId: 'GeneralTrend_PartOne',
        }
    ],
    [
        '在线直播间数', {
            unitId: 'GeneralTrend_PartTwo_composite',
            dashBoardId: 'GeneralTrend_PartTwo',
        }
    ],
    [
        '卡顿异常直播间数', {
            unitId: 'GeneralTrend_PartThree_composite',
            dashBoardId: 'GeneralTrend_PartThree',
        }
    ],
    [
        '卡顿人头率', {
            unitId: 'GeneralTrend_PartFour_composite',
            dashBoardId: 'GeneralTrend_PartFour',
        }
    ],
    [
        '时均卡顿时长(s/h)', {
            unitId: 'GeneralTrend_PartFive_composite',
            dashBoardId: 'GeneralTrend_PartFive',
        }
    ],
    [
        '时均卡顿次数(次/h)', {
            unitId: 'GeneralTrend_PartSix_composite',
            dashBoardId: 'GeneralTrend_PartSix',
        }
    ],
    [
        '聊天说卡率', {
            unitId: 'GeneralTrend_PartSeven_composite',
            dashBoardId: 'GeneralTrend_PartSeven',
        }
    ],
    [
        '聊天说卡人数', {
            unitId: 'GeneralTrend_PartEight_composite',
            dashBoardId: 'GeneralTrend_PartEight',
        }
    ],
    [
        '聊天说卡次数', {
            unitId: 'GeneralTrend_PartNine_composite',
            dashBoardId: 'GeneralTrend_PartNine',
        }
    ],
    // 流媒体看板
    [
        '拉流成功率', {
            unitId: 'StreamingMediaMonitoring_PartOne_line',
            dashBoardId: 'StreamingMediaMonitoring_PartOne',
        }
    ],
    [
        'XMPP服务器监控', {
            unitId: 'StreamingMediaMonitoring_PartTwo_composite',
            dashBoardId: 'StreamingMediaMonitoring_PartTwo',
        }
    ],
    [
        'SFU服务器监控', {
            unitId: 'StreamingMediaMonitoring_PartThree_composite',
            dashBoardId: 'StreamingMediaMonitoring_PartThree',
        }
    ],
    // webApi看板
    [
        'webApi连接成功率/人头率', {
            unitId: 'WebApi_Monitor_PartTwo_CrAndUr_composite',
            dashBoardId: 'WebApi_Monitor_PartTwo_CrAndUr',
        }
    ],
    [
        'webApi请求次数/人数', {
            unitId: 'WebApi_Monitor_PartThree_RequestPvAndRequestUv_composite',
            dashBoardId: 'WebApi_Monitor_PartThree_RequestPvAndRequestUv',
        }
    ],
    [
        'webApi失败次数/人数', {
            unitId: 'WebApi_Monitor_PartFour_FailedPvAndFailedUv_composite',
            dashBoardId: 'WebApi_Monitor_PartFour_FailedPvAndFailedUv',
        }
    ],
    [
        '响应时长', {
            unitId: 'WebApi_Monitor_PartFive_ResponseTime_composite',
            dashBoardId: 'WebApi_Monitor_PartFive_ResponseTime',
        }
    ],
    // roomServer看板
    [
        'roomServer连接成功率/人头率', {
            unitId: 'RoomServer_Monitor_PartTwo_CrAndUr_composite',
            dashBoardId: 'RoomServer_Monitor_PartTwo_CrAndUr',
        }
    ],
    [
        'roomServer请求次数/人数', {
            unitId: 'RoomServer_Monitor_PartThree_RequestPvAndRequestUv_composite',
            dashBoardId: 'RoomServer_Monitor_PartThree_RequestPvAndRequestUv',
        }
    ],
    [
        'roomServer失败次数/人数', {
            unitId: 'RoomServer_Monitor_PartFour_FailedPvAndFailedUv_composite',
            dashBoardId: 'RoomServer_Monitor_PartFour_FailedPvAndFailedUv',
        }
    ],
    [
        '连接平均时长', {
            unitId: 'RoomServer_Monitor_PartFive_AvgRsTime_line',
            dashBoardId: 'RoomServer_Monitor_PartFive_AvgRsTime',
        }
    ],

]);

export const roomMessageMap = new Map([
    // 直播间详情看板
    [
        '人数信息', {
            unitId: ['LiveRoomDetail_PartOne_card_1', 'LiveRoomDetail_PartOne_card_2'],
            dashBoardId: 'LiveRoomDetail_PartOne',
        }
    ],
    [
        '直播间信息', {
            unitId: 'LiveRoomDetail_PartTwo_excel',
            dashBoardId: 'LiveRoomDetail_PartTwo',
        }
    ],
    [
        '教师信息', {
            unitId: 'LiveRoomDetail_PartThree_excel',
            dashBoardId: 'LiveRoomDetail_PartThree',
        }
    ],
    [
        '老师关键事件', {
            unitId: 'LiveRoomDetail_PartFour_excel',
            dashBoardId: 'LiveRoomDetail_PartFour',
        }
    ],
    [
        '关联班级', {
            unitId: 'LiveRoomDetail_PartFive_excel',
            dashBoardId: 'LiveRoomDetail_PartFive',
        }
    ],
    [
        '前5分钟事件', {
            unitId: 'liveMonitoring_part_three_1_excel',
            dashBoardId: 'liveMonitoring_part_three_1',
        }
    ],
    [
        '后5分钟事件', {
            unitId: 'liveMonitoring_part_three_2_excel',
            dashBoardId: 'liveMonitoring_part_three_2',
        }
    ],
    // webApi看板-表格
    [
        'webApi错误信息详情', {
            unitId: 'WebApi_Monitor_PartSix_FailureCntAndFailureUser_excel',
            dashBoardId: 'WebApi_Monitor_PartSix_FailureCntAndFailureUser',
        }
    ],
    // roomServer看板-表格
    [
        'roomServer错误信息详情', {
            unitId: 'RoomServer_Monitor_PartSix_FailureCntAndFailureUser_excel',
            dashBoardId: 'RoomServer_Monitor_PartSix_FailureCntAndFailureUser',
        }
    ],
    // 直播间列表看板
    [
        '直播间列表', {
            unitId: 'LiveRoomList_PartOne_excel',
            dashBoardId: 'LiveRoomList_PartOne',
        }
    ],
]);
